/**
 * 
 */
package org.crystal.jqweb.dao;

import java.util.List;

import org.crystal.jqweb.db.EntityManager;

/**
 * @author Crystal
 *
 */
public interface IBaseDao {

	/**
	 * @param em the em to set
	 */
	public void setEm(EntityManager em);
	
	public EntityManager getEm();
	
	public <T> boolean add(T entity);
	
	public <T> int update(T entity);
	
	public <T> boolean delete(T entity);
	
	public<T> void refresh(T entity);
	
	public<T> void get(T entity);
		
	public<T> void lazy(T entity);
	
	public <T> List<T> list(Class<T> cls);
	
	public <T> List<T> listWhere(Class<T> cls,String where);
}
